<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>公告详情</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body {
            background: linear-gradient(-45deg, #e9e2f3, #d4c9e8, #d1c9ec);
            background-size: 400% 400%;
            animation: gradient 8s ease infinite;
            min-height: 100vh;
            padding: 2rem 0;
            margin: 0;
        }
        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .card {
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            backdrop-filter: blur(5px);
            padding: 2.5rem;
            max-width: 800px;
            margin: 0 auto;
        }
        .announcement-title {
            color: #333;
            font-weight: 700;
            margin-bottom: 1.5rem;
            text-align: center;
            position: relative;
            padding-bottom: 1rem;
        }
        .announcement-title::after {
            content: '';
            width: 60px;
            height: 3px;
            background-color: #8ab4f8;
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
        }
        .announcement-meta {
            color: #999;
            font-size: 0.9rem;
            text-align: center;
            margin-bottom: 2rem;
            border-bottom: 1px solid #eee;
            padding-bottom: 1rem;
        }
        .announcement-content {
            color: #444;
            line-height: 1.8;
            font-size: 1.05rem;
        }
        .top-tag {
            background-color: #f87171;
            color: white;
            font-size: 0.8rem;
            padding: 0.1rem 0.5rem;
            border-radius: 4px;
            margin-right: 0.5rem;
        }
        .back-btn {
            display: inline-block;
            margin-top: 2rem;
            color: #6ea8f5;
            text-decoration: none;
            font-size: 0.95rem;
        }
        .back-btn:hover {
            color: #4a89dc;
            text-decoration: underline;
        }
    </style>
</head>
<body>
<div class="card">
    <h2 class="announcement-title">
        <span th:if="${announcement.isTop}" class="top-tag">置顶</span>
        <span th:text="${announcement.title}"></span>
    </h2>

    <div class="announcement-meta">
        发布人：<span th:text="${announcement.publisher}"></span> |
        发布时间：<span th:text="${#dates.format(announcement.publishTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
    </div>

    <div class="announcement-content" th:text="${announcement.content}"></div>

    <a href="/content/announcement/list" class="back-btn">
        <i class="bi bi-arrow-left"></i> 返回公告列表
    </a>
</div>

<!-- 引入图标库 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>